Originally, wars were fought between tribes over territory and the spoils of war. As each tribe adopted a set of religious beliefs they were able to justify their killing and looting. As religion became a political force, religions fought over territory. Wars are still fought over territory.
A God is not religion but religion has used the concept of a God to justify its aims and conduct. It is likely that the world would be much the same with or without religion.
Morals are a human, social set of measures and checks on the way we live. They too would evolve without religion as we see them doing among western Christians despite the 10 commandments and the Gospel.